package com.tuyan.aixiang.component;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.RelativeLayout;

import com.tuyan.aixiang.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class DeviceControl extends RelativeLayout {

    @BindView(R.id.dci_angle)
    DeviceControlItem dciAngle;

    @BindView(R.id.dci_capture)
    DeviceControlItem dciCapture;

    @BindView(R.id.dci_hide)
    DeviceControlItem dciHide;

    @BindView(R.id.dci_mic)
    DeviceControlItem dciMic;

    @BindView(R.id.dci_replay)
    DeviceControlItem dciReplay;

    @BindView(R.id.dci_record)
    DeviceControlItem dciRecord;


    public DeviceControl(Context context) {
        this(context, null);
    }

    public DeviceControl(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public DeviceControl(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);

        View contentView = LayoutInflater.from(context).inflate(R.layout.device_control, this);
        ButterKnife.bind(contentView, this);
        init();
    }

    private void init() {
    }

    public void setOnMicClick(OnClickListener listener) {
        dciMic.setOnClickListener(listener);
    }

    public void setOnPTZClick(OnClickListener listener) {
        dciAngle.setOnClickListener(listener);
    }
}
